package com.dd.pojo.entry;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * 用户
 * @TableName sys_user
 */
@TableName(value ="sys_user")
@AllArgsConstructor
@NoArgsConstructor
@Getter
@Setter
@ApiModel("用户")
@Builder
public class User  implements Serializable {

    @ApiModelProperty("用户ID")
    @TableId(value = "user_id")
    private String userId;


    @ApiModelProperty("用户手机号")
    @TableField(value = "user_phone")
    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = "1[3456789]\\d{9}",message = "手机号码格式不正确")
    private String userPhone;

    @ApiModelProperty("用户密码")
    @TableField(value = "user_password")
    @NotBlank(message = "密码不能为空")

    private String userPassword;


    @ApiModelProperty("用户账号")
    @TableField(value = "user_count")
    @NotBlank(message = "账户不能为空")
    private String userCount;


    @ApiModelProperty("用户邮箱")
    @TableField(value = "user_email")
    @NotBlank(message = "邮箱不能为空")
    @Email(message = "邮箱格式不正确")
    private String userEmail;


    @ApiModelProperty("用户性别 1男 2 女")
    @TableField(value = "user_sex")
    private Integer userSex;



    @TableField(exist = false)
    private static final long serialVersionUID = 131L;
}